gdk: Remove gdk_window_set_invalidate_handler()
authorBenjamin Otte <otte@redhat.com>
Wed, 26 Oct 2016 22:07:01 +0000 (00:07 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 27 Oct 2016 03:03:06 +0000 (05:03 +0200)
It's not used anymore.

docs/reference/gdk/gdk4-sections.txt
docs/reference/gtk/drawing-model.xml
gdk/gdkinternals.h
gdk/gdkwindow.c
gdk/gdkwindow.h

index 7d51e65351449d297848b6ec95cfa37c57b40c18..419ce893dd174bd50e99090cf4131fb153a113e8 100644 (file)
@@ -374,8 +374,6 @@ gdk_window_begin_draw_frame
 gdk_window_end_draw_frame
 gdk_window_should_draw
 gdk_window_get_visible_region
-GdkWindowInvalidateHandlerFunc
-gdk_window_set_invalidate_handler
 
 <SUBSECTION>
 gdk_window_invalidate_rect
index 1304603dcdee587a96e653f7d8c5dae21f7f7c9a..a6a52853fb14e837fa5aa80d7332b1b670a2b9ad 100644 (file)
         hardware where self-copy operations are problematic (they break the
         rendering pipeline).
       </para>
-
-      <para>
-        Since the above causes some overhead, we introduce a caching mechanism.
-        Containers that scroll a lot (GtkViewport, GtkTextView, GtkTreeView,
-        etc) allocate an offscreen image during scrolling and render their
-        children to it (which is possible since drawing is fully hierarchical).
-        The offscreen image is a bit larger than the visible area, so most of
-        the time when scrolling it just needs to draw the offscreen in a
-        different position. This matches contemporary graphics hardware much
-        better, as well as allowing efficient transparent backgrounds.
-        In order for this to work such containers need to detect when child
-        widgets are redrawn so that it can update the offscreen. This can be
-        done with the new gdk_window_set_invalidate_handler() function.
-      </para>
     </refsect2>
 
   </refsect1>
index b9b113cd57cce32d25ec22a0ac0b6634fc0055c1..81b1e93bb61b3604ce398af7501a0c9b0bab9726 100644 (file)
@@ -328,7 +328,6 @@ struct _GdkWindow
   gulong device_changed_handler_id;
 
   GdkFrameClock *frame_clock; /* NULL to use from parent or default */
-  GdkWindowInvalidateHandlerFunc invalidate_handler;
 
   GdkDrawingContext *drawing_context;
 };
index 242b26204a28be813081ddba2b5c4485584d2c64..30647c70fa292032045776d69889423220972bfe 100644 (file)
@@ -3771,30 +3771,6 @@ gdk_window_invalidate_rect (GdkWindow          *window,
   gdk_window_invalidate_rect_full (window, rect, invalidate_children);
 }
 
-/**
- * gdk_window_set_invalidate_handler: (skip)
- * @window: a #GdkWindow
- * @handler: a #GdkWindowInvalidateHandlerFunc callback function
- *
- * Registers an invalidate handler for a specific window. This
- * will get called whenever a region in the window or its children
- * is invalidated.
- *
- * This can be used to record the invalidated region, which is
- * useful if you are keeping an offscreen copy of some region
- * and want to keep it up to date. You can also modify the
- * invalidated region in case you’re doing some effect where
- * e.g. a child widget appears in multiple places.
- *
- * Since: 3.10
- **/
-void
-gdk_window_set_invalidate_handler (GdkWindow                      *window,
-                                  GdkWindowInvalidateHandlerFunc  handler)
-{
-  window->invalidate_handler = handler;
-}
-
 static void
 impl_window_add_update_area (GdkWindow *impl_window,
                             cairo_region_t *region)
@@ -3920,9 +3896,6 @@ gdk_window_invalidate_maybe_recurse_full (GdkWindow            *window,
   while (window != NULL && 
         !cairo_region_is_empty (visible_region))
     {
-      if (window->invalidate_handler)
-       window->invalidate_handler (window, visible_region);
-
       r.width = window->width;
       r.height = window->height;
       cairo_region_intersect_rectangle (visible_region, &r);
index 4765303534dde27bf042e7a92ad4bcaf0b2b20a2..09919820395010b8902e04b3be9cb5a09442c405 100644 (file)
@@ -641,26 +641,6 @@ GdkWindowState gdk_window_get_state (GdkWindow *window);
 
 /* GdkWindow */
 
-/**
- * GdkWindowInvalidateHandlerFunc:
- * @window: a #GdkWindow
- * @region: a #cairo_region_t
- *
- * Whenever some area of the window is invalidated (directly in the
- * window or in a child window) this gets called with @region in
- * the coordinate space of @window. You can use @region to just
- * keep track of the dirty region, or you can actually change
- * @region in case you are doing display tricks like showing
- * a child in multiple places.
- *
- * Since: 3.10
- */
-typedef void (*GdkWindowInvalidateHandlerFunc)  (GdkWindow      *window,
-                                                cairo_region_t *region);
-GDK_AVAILABLE_IN_3_10
-void gdk_window_set_invalidate_handler (GdkWindow                      *window,
-                                       GdkWindowInvalidateHandlerFunc  handler);
-
 GDK_AVAILABLE_IN_ALL
 gboolean      gdk_window_has_native         (GdkWindow       *window);
 GDK_AVAILABLE_IN_ALL